package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * The persistent class for the bodegalocal database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "bodegalocal")
@NamedQuery(name = "Bodegalocal.findAll", query = "SELECT b FROM Bodegalocal b")
public class Bodegalocal implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "BODEGALOCAL_BODEGALOCALID_GENERATOR", sequenceName = "INVFAC.BODEGALOCAL_BODEGALOCALID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BODEGALOCAL_BODEGALOCALID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer bodegalocalid;

	// bi-directional many-to-one association to Bodega
	@ManyToOne
	@JoinColumn(name = "bodegaid", nullable = false)
	private Bodega bodega;

	@Column(nullable = false)
	private Integer orden;

	// bi-directional many-to-one association to Local
	@ManyToOne
	@JoinColumn(name = "localid", nullable = false)
	private Local local;

	public Bodegalocal() {
	}

	public Bodega getBodega() {
		return this.bodega;
	}

	public Integer getBodegalocalid() {
		return this.bodegalocalid;
	}

	public Local getLocal() {
		return this.local;
	}

	public Integer getOrden() {
		return orden;
	}

	public void setBodega(Bodega bodega) {
		this.bodega = bodega;
	}

	public void setBodegalocalid(Integer bodegalocalid) {
		this.bodegalocalid = bodegalocalid;
	}

	public void setLocal(Local local) {
		this.local = local;
	}

	public void setOrden(Integer orden) {
		this.orden = orden;
	}

}